﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CE.Global;

using CE.User;
using System.Web.UI.HtmlControls;

public partial class life_callus : MyLanguageAndSessionBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (usrCallMePhoneNo.GetPhoneNo().Length == 10)
        {

            Int64 _result = 0;
            ContactLifeUser _clu = new ContactLifeUser();
            ContactLifeUserDB _culdb = new ContactLifeUserDB();


            _clu.InsuranceType = "Life";
            _clu.ProductName = "SAVINGS PLAN";
            _clu.ContactNo = usrCallMePhoneNo.GetPhoneNo();
            _clu.FullName = Server.HtmlEncode(txtCallMeFullName.Text);
            _clu.CallTime = Convert.ToInt16(ddlCallMeTime.Text);
            _clu.Email = txtEmailAddress.Text.Trim();


            _result = _culdb.Insert(_clu);
            txtCallMeFullName.Text = "";
            txtEmailAddress.Text = "";
            usrCallMePhoneNo.PhoneNo = "";
            ddlCallMeTime.SelectedValue = "-1";
            ScriptManager.RegisterStartupScript(Page, this.GetType(), "alertThxU", "alert('" + Resources.CarInsurance.TQlifeInterest + "');", true);

            ScriptManager.RegisterStartupScript(Page, this.GetType(), "closepop", "window.parent.$.fancybox.close();", true);

        }

    }
}
